var singletonWindow;

chrome.app.runtime.onLaunched.addListener(function() {

	if(singletonWindow && !singletonWindow.contentWindow.closed) {
	
		singletonWindow.focus();
		
	} else {
	
		chrome.app.window.create('/html/popup.html', {
			'width': 1200,
			'height': 600,
		}, function(w) {
			singletonWindow = w;
			singletonWindow.maximize();
		});
		
	}
	
});